<script setup>
import { ref, defineEmits, defineExpose } from 'vue'
let emigFn = defineEmits(["carqx"])
const list = ref([])
const showcar = ref(false)
const showload = function (val) {
    showcar.value = true
    list.value = val
    console.log(list.value)
}

const closecar = function () {
    showcar.value = false
    emigFn("carqx")
}

defineExpose({
    showload
})
</script>
<template>
    <div>
        <van-popup
        @click-overlay="closecar"
        v-model:show="showcar"
        round
        position="bottom"
        :style="{ height: '70%' }"
        >
        <div>
            <div  v-for="(item,index) in list" :key="index" style="height: 1.533rem;padding: .2133rem;">
                <div @click="viewcar(item)" style="display: flex;height: 100%;justify-content: space-around;flex-direction: column;border-bottom: .0267rem solid #E5E6EB;">
                    <div style="font-size: .3733rem;font-weight: 600;">{{item.carNo}}&nbsp;({{ item.name }})</div>
                    <div style="display: flex;width: 100%;justify-content: space-between">
                        <div style="font-size: .32rem;color: #86909C;"  >支付时间&nbsp;:{{ item.time }}</div>
                        <div style="font-size: .3733rem;color: #ED702D;font-weight: 600;">¥{{ item.price }}</div>
                    </div>
                </div>
            </div>
        </div>
    </van-popup>
    </div>
</template>